import request from '@/utils/request'

export function getAllOldparts(pageNum) {
  return request({
    url: '/OldpartsManage/deviceinfo',
    method: 'GET',
    params: { pageNum }
  })
}
export function select(partName) {
  return request({
    url: '/OldpartsManage/selectPartName',
    method: 'GET',
    params: { partName }
  })
}
export function add(data) {
  return request({
    url: '/OldpartsManage/add',
    method: 'POST',
    data
  })
}
export function deleteDevice(oldpartsId) {
  return request({
    url: '/OldpartsManage/delete',
    method: 'GET',
    params: { oldpartsId }
  })
}
export function update(data) {
  return request({
    url: '/OldpartsManage/update',
    method: 'POST',
    data
  })
}
